package com.infosys.test.poo;

//heredamos atributos y metodos de figura
public class Triangulo extends Figura { 

//atributos
private int base,altura; 

//incio de constructor
public Triangulo (String c, int base, int altura){
super(c);
this.base=base;
this.altura=altura;
}

public int getBase(){
	return base;
}

public int getAltura(){
	return altura;
}

//inicio sobreescribiendo @Oberride
@Override
public double area() {
	return base*altura/2;
}
	
	
}
